import { createApp } from 'vue'
import { createI18n } from 'vue-i18n'
import ViewUIPlus from 'view-ui-plus'
import zh from 'view-ui-plus/dist/locale/zh-CN'
import en from 'view-ui-plus/dist/locale/en-US'

import App from './App.vue'
import router from './router'
import store from './store'
import './styles/index.less'

const i18n = createI18n({
  allowComposition: true,
  globalInjection: true,
  legacy: false,
  locale: 'zh-CN',
  messages: {
    'zh-CN': zh,
    'en-US': en
  }
})

const app = createApp(App)

app.use(router)
  .use(store)
  .use(i18n)
  .use(ViewUIPlus, { i18n })
  .mount('#app')
